import IComponentProps from '@/base/interfaces/IComponentProps';
import React, { Component, ReactNode } from 'react';
import styles from './Watermark.less';

interface IWatermarkState {}
interface IWatermarkProps extends IComponentProps {
  label: string;
  count?: number;
}

/**
 * 水印
 */
class Watermark extends Component<IWatermarkProps, IWatermarkState> {
  public render(): ReactNode {
    const { label, count = 40 } = this.props;
    return (
      <div className={styles.Watermark}>
        {new Array(count).fill(0).map((_, index) => {
          return <span key={index.toString()}>{label || ''}</span>;
        })}
      </div>
    );
  }
}

export default Watermark;
